<?php

include_once("../service/introductionService.php");
include_once("../service/imageService.php");

$insID = $_POST["insid"];
$name = $_POST["content"];

$img1 = $_FILES['img1'];
$img2 = $_FILES['img2'];
$img3 = $_FILES['img3'];
$img4 = $_FILES['img4'];
$img5 = $_FILES['img5'];

uploadIntroductionImage($img1, "1");
uploadIntroductionImage($img2, "2");
uploadIntroductionImage($img3, "3");
uploadIntroductionImage($img4, "4");
uploadIntroductionImage($img5, "5");

updateIntroduction($insID, $name);

Header("Location: ../admin-page/introductionDetail.php?message=ok&id=$insID");
?>
